<!-- 系统自动生成 Date:2021-08-14 19:57 -->
<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="ureport2报配置存储列表" bodyClass="gray-bg animated fadeInRight" isAnimation=false libs=["table","zTree"]/>
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <@f.form id="ureport-form">
                <div class="select-list">
                    <ul>
                        <li>
                            <label> <@ctx.i18n text = "文件名"/>：</label>
                            <@f.input placeholder="文件名" name="name"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;&nbsp;<@ctx.i18n text = "查询"/></a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="opt.form.reset()"><i class="fa fa-refresh"></i>&nbsp;<@ctx.i18n text = "重置"/></a>
                        </li>
                    </ul>
                </div>
            </@f.form>
        </div>
        <@table id="bootstrap-table">
            <@shiro.hasPermission name="sys:ureport:del">
                <a class="btn btn-danger multiple disabled" onclick="opt.operate.delAll()"><i class="fa fa-remove"></i> <@ctx.i18n text = "删除"/></a>
            </@shiro.hasPermission>
        </@table>
    </div>
</div>
<@footer>
<script type="text/javascript">
    var delFlag = "${permission.hasPermi("sys:ureport:del")}";
    var visible = ${permission.isPermitteds("sys:ureport:del")?string('true', 'false')};
    var prefix = baseURL + "sys/ureport";

    $(function() {
        var options = {
            url: prefix + "/list",
            delUrl: prefix + "/del",
            modalName: '<@ctx.i18n text="ureport2报配置存储"/>',
            uniqueId:  'id',/* 唯一ID */
            escape: true,/* 分页设置 */
            clickToSelect: false,
            showPageGo: true,/* 分页设置 */
            pageSize: 10,/* 分页设置 */
            pageList: [10, 30, 50],/* 分页设置 */
            columns:[
                {title: $.i18n.prop("序号"), width: 5, align: "center", formatter: function (value, row, index) {
                    return $.table.serialNumber(index);
                }}
                ,{field : 'id',title : '<@ctx.i18n text = "主键"/>',visible: false}
                ,{field : 'name',title : '<@ctx.i18n text = "文件名"/>'}
                ,{field : 'createTime',title : '<@ctx.i18n text = "创建时间"/>'}
                ,{field : 'updateTime',title : '<@ctx.i18n text = "更新时间"/>'}
                ,{title:"<@ctx.i18n text = "操作"/>",align: 'center',visible:visible,formatter: function(value, row, index) {
                    var actions = [];
                    actions.push('<a class="btn btn-default btn-xs preview " href="javascript:void(0)" onclick="opt.modal.windowOpen(\''+baseURL+'ureport/preview?_u=fast-' + row.name + '\',\''+row.name+'\')"><i class="fa fa-eye"></i> 预览</a> ');
                    actions.push('<a class="btn btn-primary btn-xs " href="javascript:void(0)" onclick="opt.modal.openTab(\''+row.name+'\',\''+baseURL+'ureport/designer?_u=fast-' + row.name + '\')" title="设计"><i class="fa fa-pencil-square-o"></i> 设计</a> ');
                    actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="opt.operate.del(\'' + row.id + '\')"><i class="fa fa-remove"></i> 删除</a>');
                    return actions.join('');
                }}
            ]
        };
        $.table.init(options);
    });
</script>
</@footer>
</@pageTheme>